package com.example.myinitializrspringbootapp.WebFilter;

import javax.servlet.*;
import java.io.IOException;

public class RequestTest1Filter implements Filter {
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {
        String fileterName=filterConfig.getInitParameter("name");
        System.out.println("过滤器测试案例1,name:"+fileterName);
    }

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        System.out.println("test1-filter");
        filterChain.doFilter(servletRequest,servletResponse);
    }

    @Override
    public void destroy() {

    }
}
